<template>
  <article>
    <div/>
    <el-carousel
      height="400px"
      class="carousel">
      <el-carousel-item
        v-for="item in carouselItem"
        :key="item.id">
        <!-- <h3 class="small">{{ item.banner_pic }}</h3> -->
        <img
          :src="item.banner_pic"
          class="entrance__icon"
          style="width: 100%;height: 100%;"
        >
      </el-carousel-item>
    </el-carousel>
    <br>
    <el-row :gutter="20">
      <el-col :span="6"><img
        src="@/assets/images//picture01.png"
        alt=""></el-col>
      <el-col :span="6"><img
        src="@/assets/images//picture03.png"
        alt=""></el-col>
      <el-col :span="6"><img
        src="@/assets/images//picture03.png"
        alt=""></el-col>
      <el-col :span="6"><img
        src="@/assets/images//picture06.png"
        alt=""></el-col>
    </el-row>
    <div
      v-for="(o, index) in 2"
      :key="o"
      :offset="index > 0 ? 2 : 0">
      <div class="title">爆款美妆</div>
      <br >
      <el-row :gutter="20">
        <el-col :span="7"><img
          src="@/assets/images//picture07.png"
          alt=""></el-col>
        <el-col :span="5">
          <el-card>
            <img
              src="@/assets/images//picture08.png"
              class="image">
            <div style="padding: center;">
              <span class="tab">一件代发</span>
              <span class="prices">￥469.00</span>
              <br>
              <div style="font-size: 12px;">博士(Bosch)GSR 120-Li双电版</div>
            </div>
          </el-card>
          <el-card>
            <img
              src="@/assets/images//picture08.png"
              class="image">
            <div style="padding: center;">
              <span class="tab">一件代发</span>
              <span class="prices">￥469.00</span>
              <br>
              <div style="font-size: 12px;">博士(Bosch)GSR 120-Li双电版</div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="5">
          <el-card>
            <img
              src="@/assets/images//picture08.png"
              class="image">
            <div style="padding: center;">
              <span class="prices">￥469.00</span>
              <br>
              <div style="font-size: 12px;">博士(Bosch)GSR 120-Li双电版</div>
            </div>
          </el-card>
          <el-card>
            <img
              src="@/assets/images//picture08.png"
              class="image">
            <div style="padding: center;">
              <span class="prices">￥469.00</span>
              <br>
              <div style="font-size: 12px;">博士(Bosch)GSR 120-Li双电版</div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="5">
          <el-card>
            <img
              src="@/assets/images//picture08.png"
              class="image">
            <div style="padding: center;">
              <span class="tab">一件代发</span>
              <span class="prices">￥469.00</span>
              <br>
              <div style="font-size: 12px;">博士(Bosch)GSR 120-Li双电版</div>
            </div>
          </el-card>
          <el-card>
            <img
              src="@/assets/images//picture08.png"
              class="image">
            <div style="padding: center;">
              <span class="tab">一件代发</span>
              <span class="prices">￥469.00</span>
              <br>
              <div style="font-size: 12px;">博士(Bosch)GSR 120-Li双电版</div>
            </div>
          </el-card>
        </el-col>
      </el-row>
    </div>
  </article>
</template>

<script>

export default {

    data: () => ({
        list: [],
        carouselItem: {},
    }),
    created() {
        this.getcarouselItem();
    },
    methods: {
        detail() {
            this.$router.push("/goodslist");
        },
        getcarouselItem() {
            this.$store
                .dispatch("home/bannerList")
                .then(data => {
                    this.carouselItem = data.banner;
                });
        }
    },
};
</script>

<style scoped>
.flex-border {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.block {
  margin-left: 200px;
}
.el-carousel__item {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 150px;
    margin: 0;
  }
.el-row {
  margin-bottom: 20px;
}
.el-col {
  border-radius: 4px;
}
.carousel {
  height: 400px;
  width: 120%;
  margin-left: -10%;
}

.title {
  border-left: 4px solid #E6A23C;
  font-size: 20px;
  padding: 0 10px;
  font-weight: bolder;
}
.card-right {
  position: relative;
  left: 70%;
}
.flex-column {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.bgcolor {
  color: #74e6d6;
}
.price {
  color: #ee7762;
  font-weight: bolder;
  position: relative;
  left: 50%;
}
.frist-badge {
  float: left;
}
.image {
  width: 100%;
}
.prices{
  font-size: 12px;
  color: #FFAC00;
}
.tab {
  float: right;
  margin-top: 2px;
  font-size: 12px;
  color: #FFAC00;
  border: 1px solid #FFAC00;
}
</style>
